function V = V_from_xy_fpitr(x, y, Vmin, Vmax)
%--------------------------------------------------------------------------
%  Written by LiuHaHa @ NWPU, 2022 01 
%  Contact me at: liuzhikan@mail.nwpu.edu.cn
%==========================================================================
% Routine Description:
%   This function calculate the exact solution of Ringleb flow 
%--------------------------------------------------------------------------
fifth=0.2; half=0.5;
one=1.0; two=2.0; three=3.0; five=5.0;
imax = 500;
tol = 1.0e-15;

%Initial guess
Vp = half*( Vmin + Vmax );

%Start iterations
for i=1: imax
    b  = sqrt(one - fifth*Vp*Vp);
    rho = b^five;
    L  =   one/b + one/(three*b^three) + one/(five*b^five) - half*log((one+b)/(one-b));
    V  = sqrt(one/sqrt( abs((x-half*L)^two + y^two) )/two/rho) ;

    if (abs(V-Vp) < tol) 
        break;
    end
    if (i == imax)
        error('\nError: did not converge... Sorry \n');
    end

    Vp = V;
end


